package com.wang.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @Classname Cart
 * @Description TODO
 * @Date 2024/10/14 8:33
 * @Created by pc
 */
@Data
@ToString
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("购物车实体类")
public class Cart {
    @ApiModelProperty("购物车编号")
    private Integer id;
    @ApiModelProperty("用户id")
    private Integer userId;
    @ApiModelProperty("商品id")
    private Integer productId;// '商品id',
    @ApiModelProperty("数量")
    private Integer quantity;//'数量',
    @ApiModelProperty("是否选择,1=已勾选,0=未勾选")
    private Integer checked;// '是否选择,1=已勾选,0=未勾选',
    @ApiModelProperty("创建时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date createTime;//创建时间
    @ApiModelProperty("最后一次更新时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date updateTime;//最后一次更新时间

}
